<template>
  <el-dialog v-model="dialogVisible" :show-close="false" :fullscreen="fullscreen" draggable overflow>
    <template #header="{ close }">
      <div>
        <span style="font-weight: bolder">{{ title  }}</span>
        <el-icon style="cursor: pointer; float: right" @click="close"><Close /></el-icon>
        <el-icon style="cursor: pointer; float: right; margin-right: 8px" @click="fullScreenFun"><FullScreen /></el-icon>
      </div>
    </template>
    <slot>默认内容</slot>
    <template #footer>
      <div class="footer-content">
        <slot name="footer"></slot>
      </div>
    </template>
  </el-dialog>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true,
    },
  },
  name: 'assignRoleDialog',
  data() {
    return {
      
      dialogVisible: false,
      fullscreen: false
    };
  },
  methods: {
    openDialog(title) {
      this.dialogVisible = true;
    },
    closeDialog() {
      this.dialogVisible = false;
    },
    fullScreenFun() {
      this.fullscreen = !this.fullscreen;
    },
   
  }
};
</script>
<style scoped>
.footer-content {
  margin-top: 5px;
  text-align: right; /* 居右对齐 */
}
</style>